<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>SUI使用</title>
    <link rel="stylesheet" type="text/css" href="http://g.alicdn.com/sj/dpl/1.5.1/css/sui-append.min.css" />
    <link rel="stylesheet" type="text/css" href="http://g.alicdn.com/sj/dpl/1.5.1/css/sui.min.css" />
    <script type="text/javascript" src="http://g.tbcdn.cn/sj/lib/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript" src="http://g.alicdn.com/sj/dpl/1.5.1/js/sui.min.js"></script>
</head>

<body>
    <form action="">
        第一个名称: <input type="text" name="FirstName" value="Mickey" /><br> 最后一个名称: <input type="text" name="LastName" value="Mouse"
        /><br>
        第一个名称: <input type="text" name="FirstName" value="Mickey" /><br> 最后一个名称: <input type="text" name="LastName" value="Mouse"
        /><br>
    </form>
    <button>序列化表单值</button>
    <input name="file" type="file" value="" style="margin: 0 auto;">
    <div id="results"></div>
    <script>
        function getMyDate(str){  
            var oDate = new Date(str),  
            oYear = oDate.getFullYear(),  
            oMonth = oDate.getMonth()+1,  
            oDay = oDate.getDate(),  
            oHour = oDate.getHours(),  
            oMin = oDate.getMinutes(),  
            oSen = oDate.getSeconds(),  
            oTime = oYear +'-'+ getzf(oMonth) +'-'+ getzf(oDay) +' '+ getzf(oHour) +':'+ getzf(oMin) +':'+getzf(oSen);//最后拼接时间  
            return oTime;  
        };  
        //补0操作  
        function getzf(num){  
            if(parseInt(num) < 10){  
                num = '0'+num;  
            }  
            return num;  
        }  

        console.log($.now())  //1505376532620
        console.log(getMyDate($.now())) //2017-09-14 16:09:48
    </script>
</body>

</html>